import design.CalendarBuilder;
import design.Input;
import design.Output;
import design.Switcher;
import design.entity.Standard;
import ics.Out;
import impl.defaultImpl.DefaultCalendarBuilder;
import impl.defaultImpl.DefaultDocxFileInput;
import impl.defaultImpl.DefaultDocxSwitcher;
import impl.defaultImpl.DefaultOutput;

import java.util.List;

/**
 * @ClassName Main .java
 * @Description empty
 * @Author LiuJinyu
 * @Date 2023/4/3 9:55
 * @Version 1.0
 */

public class Main {
    public static void main(String[] args) {
        try{
            Input input = new DefaultDocxFileInput();
            Switcher switcher = new DefaultDocxSwitcher();
            CalendarBuilder calendarBuilder =  new DefaultCalendarBuilder();
            Output output = new DefaultOutput();
            input.input();
            List<Standard> list = switcher.conversion(input.toData());
            output.output(calendarBuilder.DataToString(list));
        }catch (Exception e){
            System.out.println(e.getMessage());
            System.out.println("失败");
        }
    }
}
